package com.azure.bigstore.service;

import com.azure.bigstore.entity.Admin;
import com.azure.bigstore.entity.User;
import com.azure.bigstore.repository.AdminRepository;
import com.azure.bigstore.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Azure on 2018/1/23.
 */
@Service
public class AdminService {

    @Autowired
    private AdminRepository adminRepository;

    public Admin findByUsernameAndPassword(String username, String password){
        return adminRepository.findByUsernameAndPassword(username,password);
    }
    public Admin findByUsername(String username){
        return  adminRepository.findByUsername(username);
    }


}
